<?php

/**
 * facturas form base class.
 *
 * @package    gescell
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BasefacturasForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                    => new sfWidgetFormInputHidden(),
      'clientes_id'           => new sfWidgetFormPropelChoice(array('model' => 'clientes', 'add_empty' => false)),
      'numero_de_comprobante' => new sfWidgetFormInput(),
      'credito'               => new sfWidgetFormInputCheckbox(),
      'pagado'                => new sfWidgetFormInputCheckbox(),
      'guardado'              => new sfWidgetFormInputCheckbox(),
      'eliminado'             => new sfWidgetFormInputCheckbox(),
      'anulado'               => new sfWidgetFormInputCheckbox(),
      'fecha'                 => new sfWidgetFormDateTime(),
      'totalneto'             => new sfWidgetFormInput(),
      'exentas'               => new sfWidgetFormInput(),
      'totaliva'              => new sfWidgetFormInput(),
      'total'                 => new sfWidgetFormInput(),
      'created_at'            => new sfWidgetFormDateTime(),
      'updated_at'            => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                    => new sfValidatorPropelChoice(array('model' => 'facturas', 'column' => 'id', 'required' => false)),
      'clientes_id'           => new sfValidatorPropelChoice(array('model' => 'clientes', 'column' => 'id')),
      'numero_de_comprobante' => new sfValidatorNumber(),
      'credito'               => new sfValidatorBoolean(array('required' => false)),
      'pagado'                => new sfValidatorBoolean(array('required' => false)),
      'guardado'              => new sfValidatorBoolean(array('required' => false)),
      'eliminado'             => new sfValidatorBoolean(array('required' => false)),
      'anulado'               => new sfValidatorBoolean(array('required' => false)),
      'fecha'                 => new sfValidatorDateTime(array('required' => false)),
      'totalneto'             => new sfValidatorNumber(array('required' => false)),
      'exentas'               => new sfValidatorNumber(array('required' => false)),
      'totaliva'              => new sfValidatorNumber(array('required' => false)),
      'total'                 => new sfValidatorNumber(array('required' => false)),
      'created_at'            => new sfValidatorDateTime(array('required' => false)),
      'updated_at'            => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('facturas[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'facturas';
  }


}
